@extends('Layouts.iframe')
@section('content')
  <nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i> 首页
    <span class="c-gray en">&gt;</span> <a href="{{url('admin/order')}}">签单管理</a>
    <span class="c-gray en">&gt;</span> 查看签单
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>

  <div class="dispose">
    <div class="dispose_block">
      <p class="title">渠道信息</p>
      <ul>
        <li>签单渠道：{{$order->channel_info['my_company']}}</li>
        <li>签单人：{{$order->channel_info['manager']}}</li>
        <li>申请时间：{{$order->created_at}}</li>
        <li>分销渠道：{{array_key_exists('parent_company',$order->channel_info)?$order->channel_info['parent_company']:''}}</li>
        <li>分销人：{{array_key_exists('parent_manager',$order->channel_info)?$order->channel_info['parent_manager']:''}}</li>
      </ul>
    </div>
    <div class="dispose_block">
      <p class="title">用户信息</p>
      <ul>
        <li>客户姓名：<input type="text" name="customer" id="customer" value="{{$order->userinfo['customer']}}"></li>
        <li>联系电话：<input type="text" name="phone" id="phone" value="{{$order->userinfo['phone']}}"></li>
        <li>身份证号：<input type="text" name="idcard" id="idcard" value="{{$order->userinfo['idcard']}}"></li>
        <li>申请贷款类型：@if(array_key_exists('category_name_first',$order->confirm_loan))
            {{$order->confirm_loan['category_name_first']}}
          @endif</li>

        <li>申请贷款金额：{{$order->userinfo['apply_amount']}}(万)</li>
      </ul>
    </div>
    <div class="dispose_block">
      <p class="title">处理结果</p>
      @if($order->status == '0')
        <div class="handlingResult">
          <h3> 申请中</h3>
          <span class="min-title" style="width:auto">申请中。。。</span>
        </div>
      @elseif($order->status == '-1')
        <div class="handlingResult">
          <h3> 退单</h3>
          <span class="min-title" style="width:auto">已退单   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;退单原因：{{$order->reason}} </span>
        </div>
      @elseif($order->status == '1')
        <div class="handlingResult">
          <h3> 确认放款</h3>
          <ul>
            <li>
              <span class="min-title" style="width:auto">产品分类：
                @if(array_key_exists('category_name_first',$order->confirm_loan))
                  {{$order->confirm_loan['category_name_first']}}
                @endif -
                @if(array_key_exists('category_name_second',$order->confirm_loan))
                  {{$order->confirm_loan['category_name_second']}}
                @endif
              </span>


            </li>
            <li>
              <span class="min-title" style="width:auto">所属机构：@if(array_key_exists('agent_name',$order->confirm_loan))  {{$order->confirm_loan['agent_name']}} @endif</span>

            </li>
            <li>
              <span class="min-title" style="width:auto">产品名称：@if(array_key_exists('product_name',$order->confirm_loan)) {{$order->confirm_loan['product_name']}} @endif</span>

            </li>
            <li>
              <span class="min-title" style="width:auto">放款金额：@if(array_key_exists('loan_amount',$order->confirm_loan))  {{$order->confirm_loan['loan_amount']}} @endif (万)</span>

            <li>
              <span class="min-title" style="width:auto">
                佣金方式：
                @if(array_key_exists('fee_type',$order->confirm_loan))
                  @if($order->confirm_loan['fee_type']==1)
                    按放款比例收费（%）
                  @elseif($order->confirm_loan['fee_type']==2)
                    按笔收费（元）
                  @endif

                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  @if($order->confirm_loan['fee_type']==1)
                    {{$order->confirm_loan['fee_value']}}（%）
                  @elseif($order->confirm_loan['fee_type']==2)
                    {{$order->confirm_loan['fee_value']}}（元）
                  @endif
                @endif
              </span>
            </li>
          </ul>
        </div>
      @endif
    </div>
  </div>
@endsection
@section('js')

@endsection